package com.wnxy.consumer.b_ps;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MemberConsumer {

    private final String QUEUE_FANOUT_MEMBER = "queue-fanout-member";
    private final String EXCHANGE_FANOUT = "exchange-fanout";


    @RabbitListener(bindings = {@QueueBinding(
            value = @Queue(name = QUEUE_FANOUT_MEMBER,durable = "true"),
            exchange = @Exchange(name = EXCHANGE_FANOUT,type = ExchangeTypes.FANOUT)
    )})
    public void handlerSeat(String message) {
        System.out.println("消费者增加积分：" + message);
    }
}
